<?php
/**
 * 	Pizzapack Component Administrator Products View
 * 
 * 	@package    	com_pizzapack
 * 	@subpackage 	components
 * 	@link 				http://www.dogitar.net
 * 	@license			GNU/GPL
 */

	// No direct access
	defined( '_JEXEC' ) or die( 'Restricted access' );
	
	jimport( 'joomla.application.component.view' );
	
	/**
	 * Products View
	 *
	 * @package    com_pizzapack 
	 * @subpackage components
	 */
	class PizzapackViewProducts extends JView
	{
		/**
		 * Products view display method
		 *
		 * @return void
		 **/
		function display( $tpl = null )
		{
			JToolBarHelper::title( JText::_( 'Pizza Pack Products' ), 'generic.png' );
			JToolBarHelper::deleteList();
			JToolBarHelper::editListX();
			JToolBarHelper::addNewX();
			JToolBarHelper::preferences('com_pizzapack', '200');
			JToolBarHelper::help('help', true);
			// Options button.
			if (JFactory::getUser()->authorise('core.admin', 'com_pizzapack')) {
				JToolBarHelper::preferences('com_pizzapack');
			}
			// Get products from the model
			$model  =& $this->getModel( 'products' );
			$products =& $model->getProducts();
	
			$this->assignRef('products',	$products);
	
			parent::display( $tpl );
		}
	}